.class public Lcom/htc/android/footprints/utils/ResolutionUtil;
.super Ljava/lang/Object;
.source "ResolutionUtil.java"


# static fields
.field private static final HVGA:I = 0x2

.field private static final QVGA:I = 0x1

.field private static final UNKNOW:I = 0x0

.field private static final VGA:I = 0x4

.field private static final WVGA:I = 0x8


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 6
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private static getResolution(Landroid/content/Context;)I
    .locals 9
    .parameter "context"

    .prologue
    const/16 v8, 0x320

    const/16 v7, 0x280

    const/16 v6, 0xf0

    const/16 v5, 0x140

    const/16 v4, 0x1e0

    .line 32
    const-string v3, "window"

    invoke-virtual {p0, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/WindowManager;

    .line 34
    .local v1, m:Landroid/view/WindowManager;
    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Display;->getWidth()I

    move-result v2

    .line 35
    .local v2, w:I
    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Display;->getHeight()I

    move-result v0

    .line 37
    .local v0, h:I
    if-ne v2, v6, :cond_0

    if-eq v0, v5, :cond_1

    :cond_0
    if-ne v2, v5, :cond_2

    if-ne v0, v6, :cond_2

    .line 38
    :cond_1
    const/4 v3, 0x1

    .line 46
    :goto_0
    return v3

    .line 39
    :cond_2
    if-ne v2, v4, :cond_3

    if-eq v0, v5, :cond_4

    :cond_3
    if-ne v2, v5, :cond_5

    if-ne v0, v4, :cond_5

    .line 40
    :cond_4
    const/4 v3, 0x2

    goto :goto_0

    .line 41
    :cond_5
    if-ne v2, v4, :cond_6

    if-eq v0, v7, :cond_7

    :cond_6
    if-ne v2, v7, :cond_8

    if-ne v0, v4, :cond_8

    .line 42
    :cond_7
    const/4 v3, 0x4

    goto :goto_0

    .line 43
    :cond_8
    if-ne v2, v4, :cond_9

    if-eq v0, v8, :cond_a

    :cond_9
    if-ne v2, v8, :cond_b

    if-ne v0, v4, :cond_b

    .line 44
    :cond_a
    const/16 v3, 0x8

    goto :goto_0

    .line 46
    :cond_b
    const/4 v3, 0x0

    goto :goto_0
.end method

.method public static isHVGA(Landroid/content/Context;)Z
    .locals 1
    .parameter "c"

    .prologue
    .line 19
    invoke-static {p0}, Lcom/htc/android/footprints/utils/ResolutionUtil;->getResolution(Landroid/content/Context;)I

    move-result v0

    and-int/lit8 v0, v0, 0x2

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isQVGA(Landroid/content/Context;)Z
    .locals 1
    .parameter "c"

    .prologue
    .line 15
    invoke-static {p0}, Lcom/htc/android/footprints/utils/ResolutionUtil;->getResolution(Landroid/content/Context;)I

    move-result v0

    and-int/lit8 v0, v0, 0x1

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isVGA(Landroid/content/Context;)Z
    .locals 1
    .parameter "c"

    .prologue
    .line 23
    invoke-static {p0}, Lcom/htc/android/footprints/utils/ResolutionUtil;->getResolution(Landroid/content/Context;)I

    move-result v0

    and-int/lit8 v0, v0, 0x4

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isWVGA(Landroid/content/Context;)Z
    .locals 1
    .parameter "c"

    .prologue
    .line 27
    invoke-static {p0}, Lcom/htc/android/footprints/utils/ResolutionUtil;->getResolution(Landroid/content/Context;)I

    move-result v0

    and-int/lit8 v0, v0, 0x8

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method
